﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Version_1_3
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        bool check = false;

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void toolStripMenuItem3_Click(object sender, EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged_1(object sender, EventArgs e)
        {
            this.panel1.Visible = true;
            this.panel4.Visible = false;
            this.panel6.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.datepanel.Visible = false;
            this.panel9.Visible = false;

            radioButton1.Checked = false;

            radioButton1.BackColor = Color.White;
            radioButton2.BackColor = Color.LightGray;
            radioButton3.BackColor = Color.LightGray;

            this.textBox3.Visible = true;

            this.label11.Visible = false;
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void MainForm_Load(object sender, EventArgs e)
        {

        }

        private void label8_Click(object sender, EventArgs e)
        {

        }

        private void monthpictureBox_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = true;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.backbutton.Visible = true;

            this.textBox3.Text = "在2012年2月，你每天的做题情况如下：（如，2012/2/1你做了2道题。）";
        }

        private void enterbutton_Click(object sender, EventArgs e)
        {
            this.panel1.Visible = true;
            this.panel4.Visible = false;
            this.panel6.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.datepanel.Visible = false;
            this.panel9.Visible = false;
            this.linkLabel1.Text = this.textBox1.Text;
            this.linkLabel2.Text = this.textBox1.Text;
            this.radioButton1.Enabled = true;
            this.radioButton2.Enabled = true;
            this.radioButton3.Enabled = true;

            this.linkLabel1.Visible = true;

            this.radioButton1.BackColor = Color.White;

            this.更改牛人账号ToolStripMenuItem.Enabled = true;
        }

        private void radioButton2_CheckedChanged_1(object sender, EventArgs e)
        {
            if (check)
            {
                this.panel2.Visible = true;
                this.panel4.Visible = false;
                this.panel1.Visible = false;
                this.panel6.Visible = false;
                this.panel3.Visible = false;
                this.panel5.Visible = false;
                this.panel7.Visible = false;
                this.panel8.Visible = false;
                this.datepanel.Visible = false;
                this.panel9.Visible = false;

                radioButton2.Checked = false;

                radioButton2.BackColor = Color.White;
                radioButton1.BackColor = Color.LightGray;
                radioButton3.BackColor = Color.LightGray;

                this.textBox3.Visible = true;
                this.label11.Visible = false;
            }
            else
            {
                this.panel5.Visible = true;
                this.panel4.Visible = false;
                this.panel1.Visible = false;
                this.panel6.Visible = false;
                this.panel3.Visible = false;
                this.panel2.Visible = false;
                this.panel7.Visible = false;
                this.panel8.Visible = false;
                this.datepanel.Visible = false;
                this.panel9.Visible = false;

                radioButton2.Checked = false;

                radioButton2.BackColor = Color.White;
                radioButton1.BackColor = Color.LightGray;
                radioButton3.BackColor = Color.LightGray;

                this.textBox3.Visible = true;
                this.label11.Visible = false;
            }
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            this.panel3.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel6.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.datepanel.Visible = false;
            this.panel9.Visible = false;

            radioButton3.Checked = false;

            radioButton3.BackColor = Color.White;
            radioButton1.BackColor = Color.LightGray;
            radioButton2.BackColor = Color.LightGray;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.panel9.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.datepanel.Visible = false;
            this.panel6.Visible = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = true;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.textBox3.Text = "你所做的200道题中，按分类划分，比例如下图所示：（如，A类占16%，即32道）";
        }

        private void button8_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = true;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            //设置显示文字

            this.textBox3.Text = "在2012年2月到2013年5月，你的做题情况如下：（如，12年2月你做了20道题。）";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = true;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.textBox3.Text = "";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = true;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.textBox3.Text = "你与牛人进入系统时间做题数对比折线图（如，进入系统2个月后，你做了32道题，牛人做了54道题）：";
        }

        private void button5_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = true;
            this.jianpictureBox.Visible = false;

            this.textBox3.Text = "你与牛人所做题目，按类型分类，完成度对比如下：（如，在你们做的所有题中，A类题目，你做了56道，牛人做了98道）：";
        }

        private void button6_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = true;

            this.textBox3.Visible = false;
        }

        private void enterbutton2_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = true;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            check = true;
            this.linkLabel3.Text = this.textBox2.Text;

            this.pictureBox6.Visible = true;
            this.label2.Visible = true;
        }

        private void btnFile_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "文本文件(*.txt)|*.txt|All files(*.*)|*.*";
            ofd.DefaultExt = "txt";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                tbFile.Text = ofd.FileName;
            }
        }

        private void 更改我的账号ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = true;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;

            radioButton1.BackColor = Color.White;
            radioButton2.BackColor = Color.LightGray;
            radioButton3.BackColor = Color.LightGray;

            this.label11.Visible = false;
            this.textBox3.Visible = true;
        }

        private void 更改牛人账号ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = true;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;

            radioButton2.BackColor = Color.White;
            radioButton1.BackColor = Color.LightGray;
            radioButton3.BackColor = Color.LightGray;

            this.label11.Visible = false;
            this.textBox3.Visible = true;
        }

        private void 导入分类ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = true;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;

            this.label11.Visible = false;

        }

        private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = true;
            this.panel9.Visible = false;
            this.panel6.Visible = false;

            this.label11.Visible = false;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = false;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.label11.Visible = true;

            this.textBox3.Visible = false;
        }

        private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.datepanel.Visible = false;
            this.panel4.Visible = true;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
        }

        private void backbutton_Click(object sender, EventArgs e)
        {
            this.datepanel.Visible = true;
            this.panel4.Visible = false;
            this.panel1.Visible = false;
            this.panel2.Visible = false;
            this.panel3.Visible = false;
            this.panel5.Visible = false;
            this.panel7.Visible = false;
            this.panel8.Visible = false;
            this.panel9.Visible = false;
            this.panel6.Visible = false;
            this.datepictureBox.Visible = false;
            this.monthpictureBox.Visible = true;
            this.typepictureBox1.Visible = false;
            this.liangpictureBox.Visible = false;
            this.numberpictureBox.Visible = false;
            this.tpyepictureBox2.Visible = false;
            this.jianpictureBox.Visible = false;

            this.backbutton.Visible = false;

            this.textBox3.Text = "在2012年2月到2013年5月，你的做题情况如下：（如，12年2月你做了20道题。）";
        }

        private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://acm.hdu.edu.cn/");
        }
    }
}
